<?php

class Profile extends CActiveRecord
{
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return '{{users_profile}}';
	}
		
	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// 验证规则
		return array(
			array('nickname, realname, sex, province, towncity , birthyear, birthmonth, birthday', 'required','message'=>'*号为必填项，请填写'),
			array('sex', 'in', 'range'=>array('男','女')),
		);
	}
	
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
			
		);
	}
}